
package com.bear.cmcc.NetTestHTTP.component;

import android.telephony.CellLocation;
import android.telephony.PhoneStateListener;
import android.telephony.SignalStrength;

public class MyAppPhoneStateListener extends PhoneStateListener {

    private int netStrong = 0;

    @Override
    public void onSignalStrengthsChanged(SignalStrength signalStrength) {
        super.onSignalStrengthsChanged(signalStrength);
        try {
            int asu = signalStrength.getGsmSignalStrength();
            netStrong = -113 + 2 * asu;
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    @Override
    public void onCellLocationChanged(CellLocation location) {
        super.onCellLocationChanged(location);
    }
}
